package com.xiangxiangjd.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author 肖守凯
 * @since 2021-05-05
 */
@Data
@TableName("topic")
@ApiModel(value="Topic对象", description="")
public class Topic extends Model<Topic> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "题目id")
    @TableId(value = "id",type= IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "题目标题")
    @TableField("topic_title")
    private String topicTitle;

    @ApiModelProperty(value = "题目类型")
    @TableField("topic_type")
    private String topicType;

    @ApiModelProperty(value = "1 默认/ 2 必答")
    @TableField("topic_answer")
    private String topicAnswer;

    @ApiModelProperty(value = "题目排序")
    @TableField("topic_sort")
    private Integer topicSort;

    @ApiModelProperty(value = "跳过的题目id , 分割")
    @TableField("topic_skip")
    private String topicSkip;

    @ApiModelProperty(value = "问卷id")
    @TableField("questionnaire_id")
    private String questionnaireId;

    @ApiModelProperty(value = "0 一行显示1个/1行显示2个/2下拉")
    @TableField("topic_row")
    private String topicRow;

    @ApiModelProperty(value = "显示条件(上面矩阵单选的答案为条件)")
    @TableField("topic_condition")  //  格式为   Topicid=Answerid, Topicid2=Answerid2  （逗号 ，分割）
    private String topicCondition;

    @ApiModelProperty(value = "多选题最少选项个数")
    @TableField("topic_least")
    private String topicLeast;

    @ApiModelProperty(value = "多选题最多选项个数")
    @TableField("topic_most")
    private String topicMost;

    @ApiModelProperty(value = "引用其他问题的选项")
    @TableField("topic_quote_id")
    private String topicQuoteId;

    //一个问题对应的多个答案
    @TableField(exist=false)
    private List<Answer> answerList;

}
